<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>订单详情</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../script/jquery-1.4.4.min.js"></script>
</head>
<body>
<div class="container">
	<div class="flow">
        <div class="itemtitle">
            <h3>订单详情</h3>
            <ul>
                <li <{if $smarty.get.operation==''}>class="current"<{/if}>><a href="?m=product&s=order_detail.php&oid=<{$smarty.get.oid}>"><span>基本信息</span></a></li>
                
                <li <{if $smarty.get.operation=='log'}>class="current"<{/if}>><a href="?m=product&s=order_detail.php&oid=<{$smarty.get.oid}>&operation=log"><span>订单日志</span></a></li>
                <li <{if $smarty.get.operation=='remark_list'}>class="current"<{/if}>><a href="?m=product&s=order_detail.php&oid=<{$smarty.get.oid}>&operation=remark_list"><span>订单备注</span></a></li>
                
            </ul>
        </div>
    </div>
	<div class="h35"></div>
    <{if $smarty.get.operation==log}>
    <table class="table product">    
    <thead>
        <tr>
            <th class="partition" colspan="99">订单日志</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td width="50">序号</td>
            <td width="180">时间</td>
            <td width="180">操作人</td>
            <td width="180">行为</td>
            <td width="150">结果</td>
            <td>备注</td>
        </tr>
        <{foreach item=list key=key from=$de}>
        <tr>
            <td><{$key+1}></td>
            <td><{$list.create_time|date_format:"%Y-%m-%d&nbsp;%H:%M:%S"}></td>
            <td><{if $list.admin_name}><{$list.admin_name}><{else}>顾客<{/if}></td>
            <td><{$list.behavior}></td>
            <td><{$list.result}></td>
            <td><{$list.text}></td>
        </tr>
        <{/foreach}>
    </tbody>
    </table>
    <{elseif $smarty.get.operation=='remark_list'}>
    <table class="table product">    
    <thead>
        <tr>
            <th class="partition" colspan="99">订单日志</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td width="50">序号</td>
            <td width="180">时间</td>
            <td width="180">操作人</td>
            <td>备注</td>
        </tr>
        <{foreach item=list key=key from=$de}>
        <tr>
            <td><{$key+1}></td>
            <td><{$list.create_time|date_format:"%Y-%m-%d&nbsp;%H:%M:%S"}></td>
            <td><{$list.admin_name}></td>
            <td><{$list.text}></td>
        </tr>
        <{/foreach}>
    </tbody>
    </table>
    <{else}> 
    <table class="table">
        <thead>
            <tr>
                <th class="partition" colspan="99">订单详情</th>
            </tr>
        </thead>
        <tbody>
        <tr class="tr">
            <td width="50">订单状态</td>
            <td width="100"><b class="org"><{$de.statu_text}></b></td>
        
            <td width="50">订单编号</td>
            <td width="150"><{$de.order_id}></td>
            
            <td width="50">下单时间</td>
            <td width="150"><{$de.create_time|date_format:"%Y-%m-%d&nbsp;%H:%M:%S"}></td>
            
            <td width="50">下单平台</td>
            <td width="50"><{$client_platform[$de.client_platform]}></td>
            
            <td width="50">操作系统</td>
            <td><{$client_system[$de.client_system]}></td>
        </tr>
        <tr class="tr">
            <td>支付状态</td>
            <td><{$de.order_pay_status}></td>
            <td>配送状态</td>
            <td><{$de.order_ship_status}></td>
        </tr>
        </tbody>
    </table>
    <table class="table product">    
        <thead>
            <tr>
                <th class="partition" colspan="99">订单信息</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td class="al">编号</td>
                <td width="100">产品ID</td>
                <td width="60">产品图</td>
                <td class="al">产品</td>
                <td width="100">单价</td>
                <td width="50">订单数量</td>
                <td width="50">微仓数量</td>
                <td width="50">总数量</td>
                <td width="100">总价</td>
                <td width="100">备货期</td>
                <td width="100">出库状态</td>
            </tr>
            <{foreach item=list from=$de.product}>
            <tr>
                <td class="al"><{$list.code}></td>
                <td><{$list.pid}></td>
                <td width="50"><a href="<{$list.pic}>" target="_blank"><img width="50" height="50" src="<{$list.pic}>" onmouseover="javascript:showOriginImg('<{$list.pic}>');" onmouseout="javascript:hideOriginImg();"/></a></td>
                <td class="al <{if $list.service}>npb<{/if}>">
                    <a target="_blank" href="http://wx.52ywy.com/item-<{$list.pid}>.html">
                        <{$list.product_name}>
                    </a>
                </td>
                <td <{if $list.service}>class="npb"<{/if}>><{$config.money}><{$list.price|number_format:2}></td>
                <td <{if $list.service}>rowspan="2"<{/if}>><{$list.num-$list.microstock_num}></td>
                <td <{if $list.service}>rowspan="2"<{/if}>><{$list.microstock_num}></td>
                <td <{if $list.service}>rowspan="2"<{/if}>><{$list.num}></td>
                <td <{if $list.service}>rowspan="2"<{/if}>><{$config.money}><{$list.sum|number_format:2}></td>
                <td><{$list.waiting_time_desc}></td>
                <td><{if $list.is_stocked=='-1'}>未出库<{elseif $list.is_stocked=='1'}>已出库<{else}>未处理<{/if}></td>
            </tr>
            <{if $list.product_give}>
            <tr class="product_give">
                <td class="al">赠品</td>
                <td class="al">
                    <{foreach item=slist from=$list.product_give}>
                        <li><{$slist.pname}></li>
                    <{/foreach}>
                </td>
            </tr>
            <{/if}>
            <{if $list.service}>
            <tr class="other">
                <td class="al">服务</td>
                <td class="al">
                    <{foreach item=slist from=$list.service}>
                        <li><{$slist.name}></li>
                    <{/foreach}>
                </td>
                <td>
                    <{foreach item=slist from=$list.service}>
                        <p><{$config.money}><{$slist.price}></p>
                    <{/foreach}>
                </td>
            </tr>
            <{/if}>
            <{/foreach}>
            <{if $de.des}>
            <tr>
                <td class="al" colspan="99">备注: <{$de.des}></td>
            </tr>
            <{/if}>
        </tbody>
        <div id="productImgDetail" align="center" style="position:fixed;top:30px;left:30%;display:none;"><img width="240" height="240" src="" onerror="this.src='../image/admin/sns_img_fail_min.jpg'" /></div>
    </table>
    <table class="table">
        <tbody>
        <tr>
            <td width="100">商品总金额:</td>
            <td width="200"><{$config.money}><{$de.cost}></td>
            <td width="100">商品重量:</td>
            <td><{$de.weight}>kg</td>
            <td width="100">配送方式：</td>
            <td><{$de.shipping_name}></td>
            <td width="100">支付方式：</td>
            <td><{$de.payment_name}></td>
        </tr>
        <tr>
            <td>配送费用:</td>
            <td><{$config.money}><{$de.freight}></td>
            <td width="100">活动优惠：</td>
            <td><{$config.money}><{$de.discount}></td>
            <td width="100">优惠券：</td>
            <td><{$config.money}><{$de.cpns_price}></td>
            <td>行邮税:</td>
            <td><{$config.money}><{$de.tax_price}></td>
        </tr>
        <tr>
        	<td>保险费:</td>
        	<td><{$config.money}><{$de.insurance_fee}></td>
            <td>余额支付:</td>
            <td><{$config.money}><{$de.cash_price}></td>
            <td>应付总额:</td>
            <td colspan="3"><b class="red"><{$config.money}><{$de.cost+$de.freight+$de.tax_price+$de.insurance_fee-$de.cpns_price-$de.discount-$de.cash_price|number_format:2}></b></td>
        </tr>
        </tbody>
    </table>
    <table class="table">         
        <thead>
            <tr>
                <th class="partition" colspan="99">收货地址</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td width="100">收货人</td>
                <td><{$de.ship_name}></td>
            </tr>
            <tr>
                <td>联系电话</td>
                <td><{$de.ship_mobile}> <{$de.ship_tel}></td>
            </tr>
            <tr>
                <td>身份证号</td>
                <td><{$de.shipping_idcard}></td>
            </tr>
            <tr>
                <td>收货地址</td>
                <td><{$de.ship_addr}></td>
            </tr>
            <tr>
                <td>邮编</td>
                <td><{$de.ship_zip}></td>
            </tr>
        </tbody>
    </table>
    
<!--     <table class="table">         
        <thead>
            <tr>
                <th class="partition" colspan="99">发票信息</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td width="100">发票信息</td>
                <td><{foreach item=v key=num from=$lang.itype}><{if $num==$de.invoices.type}><{$v}><{/if}><{/foreach}></td>
            </tr>
            <{if $de.invoices.type==1}>
            <tr>
                <td>单位名称</td>
                <td><{$de.invoices.company}></td>
            </tr>
            <tr>
                <td>纳税人识别号</td>
                <td><{$de.invoices.number}></td>
            </tr>
            <tr>
                <td>注册地址</td>
                <td><{$de.invoices.address}></td>
            </tr>
            <tr>
                <td>注册电话</td>
                <td><{$de.invoices.telephone}></td>
            </tr>
            <tr>
                <td>开户银行</td>
                <td><{$de.invoices.bank}></td>
            </tr>
            <tr>
                <td>银行帐户</td>
                <td><{$de.invoices.account}></td>
            </tr>
            <{else}>
            <tr>
                <td>发票抬头</td>
                <td><{foreach item=v key=num from=$lang.irise}><{if $num==$de.invoices.rise}><{$v}><{/if}><{/foreach}><{if $de.invoices.rise==1}><{$de.invoices.company}><{/if}></td>
            </tr>
            <{/if}>
            <tr>
                <td>发票内容</td>
                <td><{foreach item=v key=num from=$lang.icontent}><{if $num==$de.invoices.content}><{$v}><{/if}><{/foreach}></td>
            </tr>
        </tbody>
    </table> -->
    <{if $de.status>=3 }>
    <table class="table">         
        <thead>
            <tr>
                <th class="partition" colspan="99">发货信息</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td width="100">快递公司</td>
                <td><{$de.shipping_express_name}></td>
            </tr>
            <tr>
                <td width="100">物流单号</td>
                <td><{$de.shipping_no}></td>
            </tr>
            <tr>
                <td width="100">发货重量</td>
                <td><{$de.shipping_weight}></td>
            </tr>
            <tr>
                <td width="100">实际运费</td>
                <td><{$de.shipping_freight}></td>
            </tr>
        </tbody>
    </table>
    <{/if}>
    <{/if}>
</div>
</body>
<script>
//展示产品图片原图
function showOriginImg(src){
    var productImgDetail = $("#productImgDetail");
    productImgDetail.find('img').attr('src',src+"/560"); 
    productImgDetail.show();
}
//隐藏产品图片原图
function hideOriginImg(){
    $("#productImgDetail").hide();
}
</script>
</html>